Technical Q&A PS05
Animating the Cursor at VBL Time


Q: I'm using the code from page 4-16 of Inside Macintosh: Processes in to animate the cursor at VBL time, but it crashed (with the stack crawl indicating SetCursor as the culprit). What's up?

A: When hardware cursor support was added to the system (System 7.5.2 for PCI Power Macs), SetCursor started requiring A5 to refer to a valid QuickDraw globals world. Despite the fact that the code to which you refer accesses no global variables, your app still needs to make sure A5 is set up for SetCursor's benefit.

An explanation of setting up A5 in a VBL task can be found on page 4-13 of Inside Macintosh: Processes.

[Jan 09 1997]


Developer Documentation | Technical Notes | Development Kits | Sample Code